Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
uint8-base64
Advanced tools
You can find a lot of NPM libraries dealing with base64 encoding and decoding.
However we could not find one that would have as input AND output an Uint8Array. This library does exactly this.
This library is pretty fast and will convert over 500 Mb per second in nodejs as well as in the browser.
$ npm i uint8-base64
import { encode } from 'uint8-base64';
const result = encode(Uint8Array.from([65])); // an array containing 'A'
// result is Uint8Array(4) [ 81, 81, 61, 61 ] ('QQ==')
import { decode } from '..';
const result = decode(Uint8Array.from([81, 81, 61, 61])); // an array containing 'QQ=='
// result is Uint8Array(1) [ 65 ] ('A')
The code was largely inspired by: https://gist.github.com/enepomnyaschih/72c423f727d395eeaa09697058238727
FAQs
Encode and decode base64 to and from Uint8Array
We found that uint8-base64 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.